package evolution.individual;

import java.util.Arrays;
import java.util.Comparator;

public class IndividualSorter {
	public static final Comparator<Individual> COMPARATOR = new Comparator<Individual>() {

		@Override
		public int compare(Individual o1, Individual o2) {
			return o2.compareTo(o1);
		}
	};

	/**
	 * best to worst
	 * 
	 * @param population
	 */
	public static void sort(Individual[] population) {
		Arrays.sort(population, COMPARATOR);
	}
}
